using System;
using WebAndLoadTestPluginsAndRules.Common;

namespace HtmlTagInnerTextTests.Common
{
    internal class FakeFilterFactory : IFilterFactory // TODO Move this to a common place to allow reuse!
    {
        private readonly Func<string, FilterMethod, bool, Filter> _filterFunc;

        public FakeFilterFactory(Func<string, FilterMethod, bool, Filter> filterFunc)
        {
            _filterFunc = filterFunc;
        }

        public Filter GetFilter(string filter, FilterMethod filterMethod, bool ignoreCase)
        {
            return _filterFunc(filter, filterMethod, ignoreCase);
        }
    }
}